from selenium import webdriver
from selenium.webdriver.common.by import By
import unittest,time
import logging
class A3mall(unittest.TestCase):
    def setUp(self):
        # 打开浏览器
        self.driver = webdriver.Edge()
        # 窗口最大化
        self.driver.maximize_window()
        # 进入网址
        self.driver.get('http://10.59.9.14:7003/')

    def tearDown(self):
        time.sleep(3)
        self.driver.quit()

    def test_a3mall_01(self):
        logging.debug('执行')
        # 点击登录
        self.driver.find_element(By.XPATH,'//a[@href="/home/login.html"]').click()
        time.sleep(2)
        # 输入账号
        self.driver.find_element(By.NAME,'username').send_keys('19131996665')
        # 输入密码
        self.driver.find_element(By.NAME,'password').send_keys('123456Aa')
        time.sleep(10)
        # 点击登录按钮
        self.driver.find_element(By.CLASS_NAME,'finish-btn').click()
        time.sleep(3)
if __name__ == '__main__':
    unittest.main()